<template>
	<view class="detail">
		<image :src="'http://124.93.196.45:10001'+detail.pic" style="width: 100%; height: 400px;"></image>
		<text>房名：{{detail.address}}</text>
		<view class="d1">
			<text>单价：{{detail.price}}</text>
			<text>面积：{{detail.areaSize}}平方米</text>
			<text>类型：{{detail.houseType}}</text>
		</view>
		<text style="font-size: 30px; color: red;">介绍:</text>
		<view class="d2">
			<text>{{detail.description}}</text>
		</view>
		<u-button type="error" text="主页" @click="tonext" style="margin-top: 20px;"></u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				detail:{}
			}
		},
		onLoad(options) {
			this.id=options.id
			this.getdetail()
		},
		methods: {
			getdetail(){
				this.api.get('/prod-api/api/house/housing/'+this.id).then(res=>{
					this.detail=res.data.data
				})
			},
			tonext(){
				uni.redirectTo({
					url:'/pages/other/house/house'
				})
			}
		}
	}
</script>

<style lang="scss">
.d1{
	margin-top: 15px;
	display: flex;
	justify-content: space-between;
}
.d2{
	line-height: 27px;
}
</style>
